﻿package com.hongguan.oms.service.grid;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.hongguan.oms.domain.grid.GridNeighborhoodCommittee;
import com.hongguan.oms.domain.grid.GridNeighborhoodCommitteeExample;
import com.hongguan.oms.service.BaseExampleService;

/**
 * GridNeighborhoodCommittee Service
 * 
 * @author 
 * 
 */
@SuppressWarnings("unchecked")
@Service
public class GridNeighborhoodCommitteeService extends BaseExampleService<GridNeighborhoodCommittee, GridNeighborhoodCommitteeExample> {

	public GridNeighborhoodCommitteeService() {
		super();
		namespace = "GRID_NEIGHBORHOOD_COMMITTEE";
	}
	
	/**
	 * 保存GridNeighborhoodCommittee
	 * 
	 * @param gridneighborhoodcommittee
	 * 
	 */
	public void saveGridNeighborhoodCommittee(GridNeighborhoodCommittee gridneighborhoodcommittee) {
		if (gridneighborhoodcommittee.getNcId() == null) {
			 insert(gridneighborhoodcommittee);
		} else {
			updateByPrimaryKey(gridneighborhoodcommittee);
		}
	}

	/**
	 * 删除GridNeighborhoodCommittee
	 * 
	 * @param gridneighborhoodcommittee
	 *            　GridNeighborhoodCommittee
	 */
	public void deleteGridNeighborhoodCommittee(GridNeighborhoodCommittee gridneighborhoodcommittee) {
		deleteByPrimaryKey(gridneighborhoodcommittee);
	}
	public void addNC(Map param){
		this.getSqlMapClientTemplate().insert("GRID_NEIGHBORHOOD_COMMITTEE.nc_add",param);
	}
	public void modifyNC(Map param){
		this.getSqlMapClientTemplate().update("GRID_NEIGHBORHOOD_COMMITTEE.nc_modify",param);
	}
	public List searchNCById(Map param){
		return this.getSqlMapClientTemplate().queryForList("GRID_NEIGHBORHOOD_COMMITTEE.nc_search_by_id",param);
	}
}

